home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vblha1 / main.frm < prev    next >
Text File  |  1995-05-07  |  15KB  |  694 lines

  1. VERSION 2.00
  2. Begin Form frmMain 
  3.    ClientHeight    =   4035
  4.    ClientLeft      =   375
  5.    ClientTop       =   1920
  6.    ClientWidth     =   8625
  7.    Height          =   4770
  8.    Left            =   315
  9.    LinkTopic       =   "Form2"
  10.    ScaleHeight     =   4035
  11.    ScaleWidth      =   8625
  12.    Top             =   1245
  13.    Width           =   8745
  14.    Begin PictureBox picStatus 
  15.       Align           =   2  'Align Bottom
  16.       BackColor       =   &H00C0C0C0&
  17.       Height          =   255
  18.       Left            =   0
  19.       ScaleHeight     =   225
  20.       ScaleWidth      =   8595
  21.       TabIndex        =   3
  22.       Top             =   3780
  23.       Width           =   8625
  24.       Begin TextBox txtMemo 
  25.          BackColor       =   &H00C0C0C0&
  26.          Height          =   285
  27.          Left            =   3840
  28.          TabIndex        =   9
  29.          Top             =   0
  30.          Width           =   1335
  31.       End
  32.       Begin TextBox txtFname 
  33.          BackColor       =   &H00C0C0C0&
  34.          Height          =   285
  35.          Left            =   2640
  36.          TabIndex        =   6
  37.          Top             =   0
  38.          Width           =   1215
  39.       End
  40.       Begin TextBox txtName 
  41.          BackColor       =   &H00C0C0C0&
  42.          Height          =   285
  43.          Left            =   1200
  44.          TabIndex        =   5
  45.          Top             =   0
  46.          Width           =   1455
  47.       End
  48.       Begin TextBox txtID 
  49.          BackColor       =   &H00C0C0C0&
  50.          Height          =   285
  51.          Left            =   120
  52.          TabIndex        =   4
  53.          Top             =   0
  54.          Width           =   1095
  55.       End
  56.    End
  57.    Begin ComboBox cboID 
  58.       Height          =   300
  59.       Left            =   1320
  60.       Style           =   2  'Dropdown List
  61.       TabIndex        =   2
  62.       Top             =   120
  63.       Width           =   1815
  64.    End
  65.    Begin PictureBox PicControl 
  66.       Align           =   1  'Align Top
  67.       BackColor       =   &H00C0C0C0&
  68.       FillColor       =   &H00FFFFFF&
  69.       Height          =   495
  70.       Left            =   0
  71.       ScaleHeight     =   465
  72.       ScaleWidth      =   8595
  73.       TabIndex        =   1
  74.       Top             =   0
  75.       Width           =   8625
  76.       Begin TextBox txtFrom 
  77.          Height          =   285
  78.          Left            =   5760
  79.          TabIndex        =   13
  80.          Top             =   120
  81.          Width           =   1215
  82.       End
  83.       Begin TextBox txtSub 
  84.          Height          =   285
  85.          Left            =   3600
  86.          TabIndex        =   11
  87.          Top             =   120
  88.          Width           =   1575
  89.       End
  90.       Begin OptionButton optMemo 
  91.          BackColor       =   &H00C0C0C0&
  92.          Caption         =   "&Memo"
  93.          FontBold        =   0   'False
  94.          FontItalic      =   0   'False
  95.          FontName        =   "Arial"
  96.          FontSize        =   8.25
  97.          FontStrikethru  =   0   'False
  98.          FontUnderline   =   0   'False
  99.          Height          =   255
  100.          Left            =   600
  101.          TabIndex        =   10
  102.          Top             =   0
  103.          Width           =   1095
  104.       End
  105.       Begin OptionButton optName 
  106.          BackColor       =   &H00C0C0C0&
  107.          Caption         =   "&Name"
  108.          FontBold        =   0   'False
  109.          FontItalic      =   0   'False
  110.          FontName        =   "Arial"
  111.          FontSize        =   8.25
  112.          FontStrikethru  =   0   'False
  113.          FontUnderline   =   0   'False
  114.          Height          =   255
  115.          Left            =   120
  116.          TabIndex        =   8
  117.          Top             =   240
  118.          Width           =   735
  119.       End
  120.       Begin OptionButton optID 
  121.          BackColor       =   &H00C0C0C0&
  122.          Caption         =   "&ID"
  123.          FontBold        =   0   'False
  124.          FontItalic      =   0   'False
  125.          FontName        =   "Arial"
  126.          FontSize        =   8.25
  127.          FontStrikethru  =   0   'False
  128.          FontUnderline   =   0   'False
  129.          Height          =   255
  130.          Left            =   120
  131.          TabIndex        =   7
  132.          Top             =   0
  133.          Width           =   495
  134.       End
  135.       Begin Label lblFrom 
  136.          BackColor       =   &H00C0C0C0&
  137.          Caption         =   "From:"
  138.          Height          =   255
  139.          Left            =   5280
  140.          TabIndex        =   14
  141.          Top             =   120
  142.          Width           =   495
  143.       End
  144.       Begin Label lblSub 
  145.          BackColor       =   &H00C0C0C0&
  146.          Caption         =   "Sub:"
  147.          Height          =   255
  148.          Left            =   3240
  149.          TabIndex        =   12
  150.          Top             =   120
  151.          Width           =   375
  152.       End
  153.    End
  154.    Begin TextBox txtWorkarea 
  155.       BorderStyle     =   0  'None
  156.       Height          =   1815
  157.       Left            =   0
  158.       MultiLine       =   -1  'True
  159.       ScrollBars      =   3  'Both
  160.       TabIndex        =   0
  161.       Top             =   480
  162.       Width           =   3375
  163.    End
  164.    Begin Menu mnuFile 
  165.       Caption         =   "&File"
  166.       Begin Menu mnuNew 
  167.          Caption         =   "&New"
  168.       End
  169.       Begin Menu mnuOpen 
  170.          Caption         =   "&Open"
  171.       End
  172.       Begin Menu mnuSave 
  173.          Caption         =   "&Save"
  174.       End
  175.       Begin Menu mnuClose 
  176.          Caption         =   "&Close"
  177.       End
  178.       Begin Menu mnuSep1 
  179.          Caption         =   "-"
  180.       End
  181.       Begin Menu mnuFDelete 
  182.          Caption         =   "&Delete"
  183.       End
  184.       Begin Menu mnuTrash 
  185.          Caption         =   "&Trash"
  186.       End
  187.       Begin Menu mnuSep2 
  188.          Caption         =   "-"
  189.       End
  190.       Begin Menu mnuExit 
  191.          Caption         =   "E&xit"
  192.       End
  193.    End
  194.    Begin Menu mnuEdit 
  195.       Caption         =   "&Edit"
  196.       Begin Menu mnuCut 
  197.          Caption         =   "Cu&t"
  198.       End
  199.       Begin Menu mnuCopy 
  200.          Caption         =   "&Copy"
  201.       End
  202.       Begin Menu mnuPaste 
  203.          Caption         =   "&Paste"
  204.       End
  205.       Begin Menu mnuDelete 
  206.          Caption         =   "&Delete"
  207.       End
  208.    End
  209.    Begin Menu mnuView 
  210.       Caption         =   "&View"
  211.    End
  212.    Begin Menu mnuOptions 
  213.       Caption         =   "&Options"
  214.    End
  215. End
  216. Option Explicit
  217.  
  218. Dim TotalRec As Long
  219.  
  220. Sub cboID_Click ()
  221.  
  222. 'Update status bar
  223. procStatusBar
  224.  
  225. End Sub
  226.  
  227. Sub Form_Activate ()
  228.  
  229. 'Update status bar
  230. procStatusBar
  231.  
  232. 'Set file name to default
  233. If workfile.fopen = "" Then
  234.  frmMain.Caption = txtFname.Text
  235. End If
  236.  
  237. End Sub
  238.  
  239. 'Copyright 1995 by Hitoshi Ozawa
  240. Sub Form_Load ()
  241.  
  242. ' Load the frmGetFile dialog box without displaying
  243. Load frmGetFile
  244.  
  245. 'Initialize the cboFileType combo box of the frmGetFile
  246. frmGetFile.cboFileType.AddItem "Text files (*.txt)"
  247. frmGetFile.cboFileType.AddItem "All files (*.*)"
  248. frmGetFile.cboFileType.AddItem "LHA files (*.LZH)"
  249. frmGetFile.cboFileType.ListIndex = 0
  250.  
  251. 'Initialize to ID selection
  252. optID.Value = True
  253.  
  254. 'Initialize ID combo list
  255. procGetID
  256.  
  257. End Sub
  258.  
  259. Sub Form_Resize ()
  260.  
  261. picControl.ScaleWidth = frmMain.ScaleWidth
  262.  
  263. txtWorkArea.Width = frmMain.ScaleWidth
  264. txtWorkArea.Height = frmMain.ScaleHeight - picControl.ScaleHeight - picStatus.ScaleHeight
  265.  
  266. End Sub
  267.  
  268. 'Copyright 1995 by Hitoshi Ozawa
  269. Sub mnuClose_Click ()
  270.  
  271. 'Clear text area
  272. txtWorkArea.Text = ""
  273. frmMain.Caption = ""
  274.  
  275. 'Reset filenames
  276. workfile.lopen = ""
  277. workfile.fopen = ""
  278.  
  279. 'Refresh frmGetfile
  280. frmGetFile.txtFileName.Text = ""
  281. frmGetFile.filFiles.Pattern = "*.txt"
  282. frmGetFile.filFiles.Refresh
  283.  
  284. End Sub
  285.  
  286. Sub mnuCopy_Click ()
  287.  
  288. 'Clear the clipboard
  289. Clipboard.Clear
  290.  
  291. 'Transfer to the clipboard
  292. Clipboard.SetText txtWorkArea.SelText
  293.  
  294. End Sub
  295.  
  296. Sub mnuCut_Click ()
  297.  
  298. 'Clear the clipboard
  299. Clipboard.Clear
  300.  
  301. 'Transfer to the clipboard
  302. Clipboard.SetText txtWorkArea.SelText
  303.  
  304. 'Delete the current selected aread
  305. txtWorkArea.SelText = ""
  306.  
  307. End Sub
  308.  
  309. Sub mnuDelete_Click ()
  310.  
  311. 'Delete selected area
  312. txtWorkArea.SelText = ""
  313.  
  314. End